package com.csit.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.csit.dao.CustomerCardDao;
import com.csit.entity.Customer;
import com.csit.entity.CustomerCard;
import com.csit.service.CustomerCardService;

@Service
public class CustomerCardServiceImpl extends BaseServiceImpl<CustomerCard, Integer> implements CustomerCardService {
	@Resource
	private CustomerCardDao customerCardDao;
	@Resource
	public void setBaseDao(CustomerCardDao customerCardDao) {
		super.setBaseDao(customerCardDao);
	}
	
	public CustomerCard getCustomerCard(Customer customer) {
		if(customer==null){
			return null;
		}
		CustomerCard card = customerCardDao.get("customer", customer);
		return card;
	}


}
